package org.dbwebx.flex.module.project.model
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	import mx.collections.ArrayCollection;
	
	/**
	 * The project manager - manages data flow between view and model. 
	 * @author Izzet_Mustafayev
	 * 
	 */
	public final class ProjectManager extends EventDispatcher
	{
		/**
		 * The project list storage.
		 */
		private var _projectList:ArrayCollection;
		
		/**
		 * Project list setter.
		 */ 
		public function storeProjects(projects:ArrayCollection):void 
		{
			this._projectList = projects;
			this.dispatchEvent(new Event("ProjectListChangeEvent"));
		}
		
		[Bindable("ProjectListChangeEvent")]
		/**
		 * Returns project loaded list.
		 * @return
		 */
		public function get projectList():ArrayCollection 
		{
			return this._projectList;
		}
	}
}